# 计算客户最高贷款额度，参数分别是 存款、负债、年收入 单位是万元
def credit(saving, debt, revenue,  car=0, married = False, *house):
    # 必选参数放在默认参数前 默认参数放在不定长参数前
    max_loan = revenue * 5 + saving - debt + car

    for h in house:
        max_loan += h

    if married:
        max_loan *= 2
    return max_loan

if __name__ =='__main__':
    m = credit(4, 5, 2, 10, True, 150, 145, 70)
    # 又存在 必选参数 又存在 默认参数 就不要关键字传输了
    print("您最高的贷款额度是:%d" %(m))
    

